(define (looking a lat)
  (keep-looking a (pick 1 lat) lat))

(define (keep-looking a sorn lat)
  (cond
    ((number? sorn)
     (keep-looking a (pick sorn lat) lat))
    (else (eq? sorn a))))

(define (pick sorn lat)
  (cond
    ((= sorn 1) (car lat))
    (else (pick (- sorn 1) (cdr lat)))))

(define (shift pair)
  (build (first (first pair))
         (build (second (first pair))
                (second pair))))
